import { ModuleTypes } from '@/store'


export enum ActionTypes {
    ACTION_GENERATE_ROUTER = "ACTION_GENERATE_ROUTER"
}

const someKey = enumKeysAsString(ActionTypes);

export type ActionTypesNamespaced = `${ModuleTypes.permissionsModule}/${typeof someKey}`


function enumKeysAsString<TEnum>(theEnum: TEnum): keyof TEnum {
    const keys = Object.keys(theEnum).filter(x =>
        (+x) + "" !== x) as (keyof TEnum)[];
    return keys[Math.floor(Math.random() * keys.length)];
}